package com.shigu.admin.action;

import com.shigu.MallResponse;
import com.shigu.kefu.bo.ModifyAskRequest;
import com.shigu.kefu.bo.ModifyConcactRequest;
import com.shigu.kefu.service.ContactService;
import com.shigu.kefu.vo.AdminConcactResponse;
import com.shigu.kefu.vo.ConcactInfoResponse;
import com.shigu.kefu.vo.QuickUpgradeResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/*
 * create by  过儿  2019-05-06
 *
 */
@Controller
@RequestMapping("adminjson")
public class ConcactController {

    @Autowired
    ContactService contactService;

    @RequestMapping("getContactInfo")
    @ResponseBody
    public AdminConcactResponse getContactInfo(){
       return contactService.kefuContact();
    }

    @RequestMapping("modifyContact")
    @ResponseBody
    public MallResponse modifyContact(ModifyConcactRequest request){
        return contactService.modifyContact(request.getFiledName(),request.getValue());
    }


    @RequestMapping("modifyAskList")
    @ResponseBody
    public MallResponse modifyAskList(@RequestBody ModifyAskRequest request ){
        return contactService.modifyAskList(request.getData());
    }

}
